<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型外边距</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background-color: pink;
            margin: 20px;
        }
        .box2{
            width: 200px;
            height: 200px;
            background-color: pink;
            margin-top: 20px;
            margin-bottom: 30px;
            margin-left: 40px;
            margin-right: 50px;
        }
    </style>
</head>
<body>
    <div class="box1"> div标签1 </div>
<br>
    <div class="box2"> div标签2 margin 20 px </div>
</body>
</html>